The present invention relates to a memory card carrying a non-volatile memory, and a memory controller applied to a non-volatile memory card. For example, the present invention relates to a technique effective for improvement in reliability of memory information when applied to a flash memory carrying memory card interchangeable with a hard disk.
In a memory card using an electrically erasable and writable non-volatile memory such as a flash memory, an ECC circuit is mounted in a memory controller so as to generate an error correction code when writing data in a non-volatile memory to perform the error detection and correction by using the error correction code when reading out the data from the non-volatile memory. In this manner, in a memory device using the conventional flash memory, the verification for the data error generation in the data which is written in a flash memory by a host compute is performed by the host computer only when it reads out the data.
Therefore, in the conventional memory card, the data error due to the flash memory retention or the like is not corrected until the data is read out by the host computer. The non-volatile memory cell such as a flash memory stores information as variation of a threshold voltage of a transistor. This characteristic of the non-volatile memory cell may deteriorate by aging and also by external factors such as ultraviolet rays. Therefore, it is possible that the data error extends to the bit number larger than the correctable number when the host computer reads out the data from the flash memory. The inventors of the present invention have found that it is desired for improvement in reliability of the memory information to actively carry out the verification of all data stored in a flash memory and to conduct efficiently rewriting of the corrected data.